package cn.buk.tms.car.dto;

import cn.buk.tms.common.dto.base.BaseOrderDto;
import com.fasterxml.jackson.annotation.JsonInclude;

import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import java.math.BigDecimal;

/**
 * 租车订单
 * @author yfdai
 */
public class CarOrderRequestDto extends BaseOrderDto {

  /**
   * 客户ID：
   * 0 - 散客
   * >1 - 客户（企业散客，企业客户）
   */
  @NotNull
  @Min(0)
  private Integer customerId;

  /**
   * 联系人
   */
  @NotNull
  @Size(min = 2)
  private String linkman;

  /**
   * 联系电话
   */
  @NotNull
  @Size(min = 6)
  private String linkPhone;

  /**
   * 联系电子邮件
   */
  private String email;


  /**
   * 用车类型
   * 1-接飞机，2-送飞机，3-接火车，4-送火车
   */
  @Min(1)
  private int useType;

  /**
   * 用车城市
   */
  @Min(1)
  private int cityId;

  /**
   * 城市名
   */
  private String cityName;

  /**
   * 接送的机场代码
   */
  private String airportCode;

  /**
   * 航班号
   */
  private String flightNo;

  /**
   * 出发地址
   */
  @NotNull
  @Size(min = 2)
  private String departureAddress;

  /**
   * 到达地址
   */
  @NotNull
  @Size(min = 2)
  private String arrivalAddress;

  /**
   * 用车时间
   */
  @Size(min = 10, message = "用车日期格式：yyyy-MM-dd")
  private String useDate;

  @Size(min = 4, message = "用车时间格式：HH:mm")
  private String useTime;

  /**
   * 订单状态
   */
  private int status;

  /**
   * 车型类型id
   */
  @Min(1)
  private int vehicleTypeId;

  /**
   * 车型组名称
   */
  @JsonInclude(JsonInclude.Include.NON_NULL)
  private String vehicleTypeName;

  /**
   * 价格
   */
  private double price;

  private double serviceCharge;

  /**
   * 优惠金额
   */
  private double discount;

  /**
   * 成本
   */
  private double cost;

  private double totalAmount;

  private double totalCost;

  /**
   * 利润
   */
  private Double profit;

  private String remark;

  /**
   * 供应商id
   */
  private int supplierId;

  /**
   * 支出方式名称
   */
  private int paymentMethodId;

  /**
   * 订单提交人
   */
  private String operator;
  /**
   * 订单处理人
   */
  private String ticketer;

  public int getUseType() {
    return useType;
  }

  public void setUseType(int useType) {
    this.useType = useType;
  }

  public int getCityId() {
    return cityId;
  }

  public void setCityId(int cityId) {
    this.cityId = cityId;
  }

  public String getAirportCode() {
    return airportCode;
  }

  public void setAirportCode(String airportCode) {
    this.airportCode = airportCode;
  }

  public String getDepartureAddress() {
    return departureAddress;
  }

  public void setDepartureAddress(String departureAddress) {
    this.departureAddress = departureAddress;
  }

  public String getArrivalAddress() {
    return arrivalAddress;
  }

  public void setArrivalAddress(String arrivalAddress) {
    this.arrivalAddress = arrivalAddress;
  }



  public String getCityName() {
    return cityName;
  }

  public void setCityName(String cityName) {
    this.cityName = cityName;
  }

  public int getStatus() {
    return status;
  }

  public void setStatus(int status) {
    this.status = status;
  }

  public String getFlightNo() {
    return flightNo;
  }

  public void setFlightNo(String flightNo) {
    this.flightNo = flightNo;
  }


  public String getVehicleTypeName() {
    return vehicleTypeName;
  }

  public void setVehicleTypeName(String vehicleTypeName) {
    this.vehicleTypeName = vehicleTypeName;
  }

  public void setLinkman(String linkman) {
    this.linkman = linkman;
  }

  public String getLinkman() {
    return linkman;
  }

  public void setLinkPhone(String linkPhone) {
    this.linkPhone = linkPhone;
  }

  public String getLinkPhone() {
    return linkPhone;
  }

  public Double getPrice() {
    return price;
  }

  public void setPrice(Double price) {
    this.price = price;
  }

  public String getRemark() {
    return remark;
  }

  public void setRemark(String remark) {
    this.remark = remark;
  }

  public Double getDiscount() {
    return discount;
  }

  public void setDiscount(Double discount) {
    this.discount = discount;
  }

  public Double getProfit() {
    return profit;
  }

  public void setProfit(Double profit) {
    this.profit = profit;
  }

  public Double getCost() {
    return cost;
  }

  public void setCost(Double cost) {
    this.cost = cost;
  }

  public Double getTotalAmount() {
    return totalAmount;
  }

  public void setTotalAmount(Double totalAmount) {
    this.totalAmount = totalAmount;
  }

  public Double getTotalCost() {
    return totalCost;
  }

  public void setTotalCost(Double totalCost) {
    this.totalCost = totalCost;
  }

  public String getOperator() {
    return operator;
  }

  public void setOperator(String operator) {
    this.operator = operator;
  }

  public String getTicketer() {
    return ticketer;
  }

  public void setTicketer(String ticketer) {
    this.ticketer = ticketer;
  }

  public String getEmail() {
    return email;
  }

  public void setEmail(String email) {
    this.email = email;
  }

  public int getCustomerId() {
    return customerId == null ? -1: customerId;
  }

  public void setCustomerId(Integer customerId) {
    this.customerId = customerId;
  }

  public String getUseDate() {
    return useDate;
  }

  public void setUseDate(String useDate) {
    this.useDate = useDate;
  }

  public String getUseTime() {
    return useTime;
  }

  public void setUseTime(String useTime) {
    this.useTime = useTime;
  }

  public Double getServiceCharge() {
    return serviceCharge;
  }

  public void setServiceCharge(Double serviceCharge) {
    this.serviceCharge = serviceCharge;
  }

  public int getVehicleTypeId() {
    return vehicleTypeId;
  }

  public void setVehicleTypeId(int vehicleTypeId) {
    this.vehicleTypeId = vehicleTypeId;
  }

  public int getPaymentMethodId() {
    return paymentMethodId;
  }

  public void setPaymentMethodId(int paymentMethodId) {
    this.paymentMethodId = paymentMethodId;
  }

  public int getSupplierId() {
    return supplierId;
  }

  public void setSupplierId(int supplierId) {
    this.supplierId = supplierId;
  }
}

